<template>
	<view>
		<view  v-for="(item, index) in topicLabelbyidone" :key="index">
			<u-swiper style="height:300px" :list="item.url" @change="e => currentNum = e.current" :autoplay="false" indicatorStyle="right: 20px">
				<view slot="indicator" class="indicator-num">
					<text class="indicator-num__text" >{{ currentNum + 1 }}/{{ item.url.length }}</text>
				</view>
			</u-swiper>
			<view>
			<u-row customStyle="margin-bottom: 10px;margin-top:20px">
				<u-col span="2" style="margin-left:5%">
					<view class="demo-layout bg-purple">
						<u-avatar :src="imgUrl" shape="circle"></u-avatar>
					</view>
				</u-col>
				<u-col span="4">
					<view class="demo-layout bg-purple-light">
						<p style="font-weight: bold;font-size: 14px;">qq</p>
						<p style="font-size: 13px;">共33篇日记</p>
					</view>
				</u-col>
				<u-col span="6">
					<view class="demo-layout bg-purple-dark">
						<button  class="span_2" >关注</button>
					</view>
				</u-col>
			</u-row>
			</view>
			<view style="margin-left:6%">
				<view style="font-weight: bold;margin-top:20px">{{item.releaseTopicTitle}}</view>
				<view style="font-size: 15px;width:90%;margin-top:20px">{{item.releaseTopicContent}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgUrl: 'http://c.svner.cn/19.jpg',
				id:'',
				// 查询话题
				topicLabelbyidone: [],
				// 轮播指示器
				currentNum: 0,
				totalPrice: ''
			}
		},
		onLoad(option) {
			this.id=option.id
			this.huatixq()
		},
		methods: {
			// 查询话题
			huatixq () {
				this.$axios({
					url: '/contents/getTopicLabelByIdOne?id=' + this.id,
					method: 'get',
					success: (res) => {
						if (res.data.code === 200) {
							this.topicLabelbyidone = res.data.object
						 //   for (let i = 0; i < this.topicLabelbyidone.length; i++) {
							// this.totalPrice = (this.topicLabelbyidone[i].releaseTopicFileId.split(",")) ;
						 //   }
						}
					}
				})
			},
		}
	}
</script>

<style>
.span_2{
		margin-left: 10%;
		margin-top:0px;
		height: 25px;
		width: 80px;
		border-radius: 20px 20px 20px;
		line-height: 180%;
		background-color: #3B3B3B;
		color: white;
		font-size: 13px;
	}
</style>
